package com.colorfruit.framework.common.util;

import java.math.BigDecimal;

public class DataValidateUtil {

    /**
     * 校验string不能为空 如果没通过返回false 如果校验通过返回ture
     * @param args
     * @return
     */
    public static boolean verifyString(String ... args ){
        for (String param : args){
            if (param == null || "".equals(param)){
                return false;
            }
        }
        return true;
    }

    public static boolean verifyBigDecimal(BigDecimal ... args){
        for (BigDecimal param : args){
            if (param == null || param.compareTo(new BigDecimal(0)) <= 0){
                return false;
            }
        }
        return true;
    }

    public static boolean verifyByte(Byte ... args){
        for (Byte param : args){
            if (param == null || param == 0){
                return false;
            }
        }
        return true;
    }

    public static boolean verifyLong (Long ... args){
        for (Long arg : args) {
            if (arg == null || arg == 0){
                return false;
            }
        }
        return true;
    }

    public static boolean verifyInteger(Integer ... args){
        for (Integer arg : args) {
            if (arg == null || arg == 0){
                return false;
            }
        }
        return true;
    }

}
